package com.webdev.newtech.controller;
import com.webdev.newtech.utils.AjaxResult;
import io.jsonwebtoken.SignatureException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
public class PermissionHandler {
    @ExceptionHandler(value = { SignatureException.class })
    @ResponseBody
    public AjaxResult authorizationException(SignatureException e){
        return AjaxResult.error(e.getMessage());
    }
}